package com.mes.cloud.dto;

import com.mes.cloud.annotation.ExcelAttribute;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 职位
 *
 * @author wxm
 * @Time 2019-4-16
 */
@ApiModel(value = "PostDTO", description = "职位信息")
@Data
public class PostDTO extends BaseDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ApiModelProperty(value = "ID", dataType = "Long")
    @ExcelAttribute(name = "ID", column = "A")
    private Long id;
    /**
     * 职位名称
     */
    @ApiModelProperty(value = "职位名称", dataType = "String")
    @ExcelAttribute(name = "职位名称", column = "B")
    @NotNull(message = "职位名称不能为空！")
    private String name;
    /**
     * 职位编码
     */
    @ApiModelProperty(value = "职位编码", dataType = "String")
    @ExcelAttribute(name = "职位编码", column = "C")
//    @NotNull(message = "职位编码不能为空！")
    private String code;
    /**
     * 组织Id
     */
    @ApiModelProperty(value = "组织Id", dataType = "Long")
    @ExcelAttribute(name = "组织Id", column = "D")
    @NotNull(message = "组织Id不能为空！")
    private Long orgId;
    /**
     * 是否启用
     */
    @ApiModelProperty(value = "状态", dataType = "String")
    private String status;

    /**
     *
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    @ExcelAttribute(name = "创建时间", column = "E")
    private Date crtdate;

    /**
     *
     */
    @ApiModelProperty(value = "修改时间", dataType = "Date")
    @ExcelAttribute(name = "修改时间", column = "F")
    private Date upddate;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", dataType = "String")
    @ExcelAttribute(name = "描述", column = "G")
    private String remark;
    /**
     *
     */
    @ApiModelProperty(value = "是否删除 0正常/1删除", dataType = "Integer")
    private Integer isDelete;
    /**
     *
     */
    @ApiModelProperty(value = "0正常/1禁用", dataType = "Integer")
    @ExcelAttribute(name = "0正常/1禁用", column = "H")
    private Integer isEnable;
    /**
     * 职位类型
     */
    @ApiModelProperty(value = "职位类型", dataType = "String")
    @ExcelAttribute(name = "职位类型", column = "I")
    private String postType;

    @ApiModelProperty(value = "组织负责人0是 1否", dataType = "Integer")
    @ExcelAttribute(name = "组织负责人0是 1否", column = "J")
    private Integer orgResponsible;

    @ApiModelProperty(value = "上级职位", dataType = "Long")
    @ExcelAttribute(name = "上级职位", column = "K")
    private Long parentId;

    @ApiModelProperty(value = "职位标识：0/标准 1/虚拟", dataType = "Integer")
    @ExcelAttribute(name = "职位标识：0/标准 1/虚拟", column = "L")
    private String postSign;

    private List<PostDTO> children = new ArrayList<PostDTO>();

}
